package org.charles.zhifou.model.dto.user;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serial;
import java.io.Serializable;

/**
 * 用户注册请求体
 *
 * @author Charles
 * @version 1.0
 */

@Data
@Schema(description = "用户注册请求体")
public class UserRegisterRequest implements Serializable {

    @Schema(description = "用户账号")
    @Length(min = 4, max = 100, message = "用户账号长度不能小于 4 个字符且不能大于 100 个字符")
    private String userAccount;

    @Schema(description = "用户密码")
    @Length(min = 8, max = 100, message = "用户密码长度不能小于 8 个字符且不能大于 100 个字符")
    private String userPassword;

    @Schema(description = "校验密码")
    @NotBlank(message = "校验密码不能为空")
    private String checkPassword;

    @Serial
    private static final long serialVersionUID = 1L;
}
